import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class HomeDrawer extends StatelessWidget {
  const HomeDrawer({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: [
        Header(),
        ...Body(),
      ],
    );
  }

  Widget Header() {
    return UserAccountsDrawerHeader(
        currentAccountPicture: CircleAvatar(
          child: Image.network("https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fsafe-img.xhscdn.com%2Fbw1%2Fbf6fe5f0-4e5c-4dd1-9545-f58151164f0c%3FimageView2%2F2%2Fw%2F1080%2Fformat%2Fjpg&refer=http%3A%2F%2Fsafe-img.xhscdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1687259365&t=0e6ae9793d9f61f956d0ec7a483c35a9"),
        ),
        accountName: Text("Marverick"),
        accountEmail: Text("effective_code@163.com")
    );
  }

  List<Widget> Body() {
    return [
      ListTile(
        title: Text("历史记录"),
        leading: const Icon(Icons.record_voice_over_rounded),
        onTap: () {

        },
      ),
      ListTile(
        title: Text("关于密码管理器"),
        leading: const Icon(Icons.adb),
        onTap: () {

        },
      )
    ];
  }


}
